﻿
Imports elpmis
Imports httpFunctions

Public Module httpshare
    Public Function currentContext() As httpContext
        Return httpServer2.currentContext()
    End Function
End Module

Namespace lpmshttp
    Public Module _register
        Private Sub registerSharedVariables()
            context.insertSharedVariable("serverName", New const_bare_variable(typeDefination.string, applicationSign()))
        End Sub

        Private Sub registerSharedFunctions()
            context.insertSharedFunction(New writeresponse())
            context.insertSharedFunction(New writeresponsebytes())
            context.insertSharedFunction(New sendresponsebytes())
            context.insertSharedFunction(New addresponseheader())
            context.insertSharedFunction(New overwriteresponseheader())
            context.insertSharedFunction(New removeresponseheader())
            context.insertSharedFunction(New httpcontenttype())
            context.insertSharedFunction(New setcontenttypeOctetStream())
            context.insertSharedFunction(New setcontenttypeTextPlainUtf8())
            context.insertSharedFunction(New setcontenttypeTextHtmlUtf8())
            context.insertSharedFunction(New httpstatuscode())
            context.insertSharedFunction(New httpredirect())
            context.insertSharedFunction(New httprequestquery())
            context.insertSharedFunction(New httprequestcookie())
            context.insertSharedFunction(New httprequestip())
            context.insertSharedFunction(New httpresponsecookie())
            context.insertSharedFunction(New httprequestpath())
            context.insertSharedFunction(New httprequesturl())
            context.insertSharedFunction(New requestformdata())
            context.insertSharedFunction(New httpresponsecontentlength())
            context.insertSharedFunction(New defaultcontenttype())

            context.insertSharedFunction(New xhtmlpagecreator())
            context.insertSharedFunction(New xhtmlpagetitle())
            context.insertSharedFunction(New xhtmlpagehtml())
            context.insertSharedFunction(New xhtmlpagehead())
            context.insertSharedFunction(New xhtmlpagebody())
            context.insertSharedFunction(New xhtmlpageinlinescript())
            context.insertSharedFunction(New xhtmlpageinlinestyle())
            context.insertSharedFunction(New xhtmlpagefooter())
            context.insertSharedFunction(New xhtmlpageaddinlinescript())
            context.insertSharedFunction(New xhtmlpageaddinlinestyle())
            context.insertSharedFunction(New xhtmlpageaddendinlinescript())
            context.insertSharedFunction(New xhtmlpageaddcsslink())
            context.insertSharedFunction(New xhtmlpageaddjslink())
            context.insertSharedFunction(New xhtmlpageaddregisteredinlinescript())
            context.insertSharedFunction(New xhtmlpageaddregisteredinlinestyle())
            context.insertSharedFunction(New registerinlinescript())
            context.insertSharedFunction(New registerinlinestyle())
            context.insertSharedFunction(New inlineResourceContent())
            context.insertSharedFunction(New xhtmlpagebackgroundDownloaderAdd())

            context.insertSharedFunction(New xmladdchild())
            context.insertSharedFunction(New xmlcreate())
            context.insertSharedFunction(New xmlrender())
            context.insertSharedFunction(New xmlattribute())
            context.insertSharedFunction(New xmltext())
            context.insertSharedFunction(New xmltextcreator())
            context.insertSharedFunction(New containercreator())

            context.insertSharedFunction(New postercreator())
            context.insertSharedFunction(New posterdatasourcecreator())
            context.insertSharedFunction(New postersetdata())
            context.insertSharedFunction(New posterviewercreator())
            context.insertSharedFunction(New posterviewerdatasourcecreator())
            context.insertSharedFunction(New posterviewersetdata())

            context.insertSharedFunction(New antiInputSpamCreator())
            context.insertSharedFunction(New antiInputSpamAsTextCreator())
            context.insertSharedFunction(New antiInputSpamSetOnsubmitFunction())
            context.insertSharedFunction(New antiInputSpamCheck())

            context.insertSharedFunction(New jsajaxresponse())
            context.insertSharedFunction(New jsajaxcall())
            context.insertSharedFunction(New jschangeInnerHtmlById())
            context.insertSharedFunction(New jsInterval())
            context.insertSharedFunction(New jschangeValue())
            context.insertSharedFunction(New jsnumbercheck())
            context.insertSharedFunction(New jsnumberreplace2())
            context.insertSharedFunction(New jsvisibilityById())
            context.insertSharedFunction(New jsshowById())
            context.insertSharedFunction(New jshideById())
            context.insertSharedFunction(New jschangeById())
            context.insertSharedFunction(New jsgetelementById())
            context.insertSharedFunction(New _jsrnd())

            context.insertSharedFunction(New generatecssrequestlink())
            context.insertSharedFunction(New generatestaticrequestlink())

            context.insertSharedFunction(New formdataname())
            context.insertSharedFunction(New formdatafilename())
            context.insertSharedFunction(New formdatacontent())
            context.insertSharedFunction(New formdataread())
            context.insertSharedFunction(New formdatacontainsfile())
            context.insertSharedFunction(New formdatatempfile())
        End Sub

        Public Sub register()
            registerSharedVariables()
            registerSharedFunctions()
        End Sub
    End Module
End Namespace
